package com.example.demo.filter;

import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class GlobalExceptionHandler {

    @ExceptionHandler(value = {RuntimeException.class})
    public String handler (RuntimeException runtimeException) {
        return runtimeException.getMessage();
    }

}
